package com.beeway.blackgoose.utils;


import android.app.ProgressDialog;
import android.content.Context;

/**
 * Created by Administrator on 2015/8/19.
 */
public class ProgressUtils {
    private static ProgressUtils progressUtils;
    private ProgressDialog processDia;
    private String msg;

    private ProgressUtils() {

    }

    public static ProgressUtils getInstances() {
        if (progressUtils == null) {
            progressUtils = new ProgressUtils();
        }
        return progressUtils;
    }

    public void showProgress(Context context, String msg) {
        processDia = new ProgressDialog(context);
        processDia.setMessage(msg);
        processDia.setIndeterminate(true);
        processDia.setCancelable(true);
        processDia.show();
    }

    public void hideProgress() {
        if (processDia != null) {
            processDia.dismiss();
            processDia = null;
        }
    }

}
